module Auty
  !
  ! Analyze Format I/O Utilities
  !
  !
  ! LICENSE AGREEMENT:
  !
  ! You agree that we don't agree to anything.
  !
  !
  ! DISCLAIMER OF WARRANTIES:
  !
  ! This software is provided to you "AS IS," and the authors and
  ! contributors disclaim any warranty or liability obligations to you
  ! of any kind, implied or express, including but not limited to the
  ! warranties of merchantability, fitness for a particular purpose,
  ! and non-infringement.
  ! 
  implicit none
  type header_key
     integer*4 sizeof_hdr
     character*10 data_type
     character*18 db_name
     integer*4 extents
     integer*2 session_error
     character*1 regular
     integer*1 hkey_un0
  end type header_key
  type image_dimension
     integer*2 dim(8)
     character*4 vox_units
     character*8 cal_units
     integer*2 unused1
     integer*2 datatype
     integer*2 bitpix
     integer*2 dim_un0
     real*4 pixdim(8)
     real*4 vox_offset
     real*4 funused(3)
     real*4 cal_max
     real*4 cal_min
     real*4 compressed
     real*4 verified
     integer*4 glmax,glmin
  end type image_dimension
  type data_history
     character*80 descrip
     character*24 aux_file
     integer*1 orient
     character*10 originator
     character*10 generated
     character*10 scannum
     character*10 patient_id
     character*10 exp_date
     character*10 exp_time
     character*3 hist_un0
     integer*4 views
     integer*4 vols_added
     integer*4 start_field
     integer*4 field_skip
     integer*4 omax,omin
     integer*4 smax,smin
  end type data_history
  integer,parameter:: DT_NONE          =   0
  integer,parameter:: DT_UNKNOWN       =   0
  integer,parameter:: DT_BINARY        =   1
  integer,parameter:: DT_UNSIGNED_CHAR =   2
  integer,parameter:: DT_SIGNED_SHORT  =   4
  integer,parameter:: DT_SIGNED_INT    =   8
  integer,parameter:: DT_FLOAT         =  16
  integer,parameter:: DT_COMPLEX       =  32
  integer,parameter:: DT_DOUBLE        =  64
  integer,parameter:: DT_RGB           = 128
  integer,parameter:: DT_ALL           = 255     
  type ana_hdr
     type(header_key) hk
     type(image_dimension) id
     type(data_history) dh
  end type ana_hdr
end module Auty
